Skip to content

Implemented all methods in Practice.java#8

Open
jmakho01 wants to merge 10 commits intogrc-cohort-22:mainfrom
jmakho01:main
Open

Implemented all methods in Practice.java#8
jmakho01 wants to merge 10 commits intogrc-cohort-22:mainfrom
jmakho01:main

Conversation

@jmakho01
Copy link
Copy Markdown

@jmakho01 jmakho01 commented Apr 9, 2026

Completed all methods, all unit tests pass for each method.

Copy link
Copy Markdown

@auberonedu auberonedu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, but can you think of how to make your code more robust to the below cases?

Comment thread src/Practice.java
Comment on lines +39 to +40
int wordLength = 99;
String shortest = "";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would happen if our shortest word was "bababadalgharaghtakamminarronnkonnbronntonnerronntuonnthunntrovarrhounawnskawntoohoohoordenenthurnuk" (the first 100-letter-long thunderword in the modernist classic "Finnegans Wake")? Can you think of how you could change your code to be more robust?

Comment thread src/Practice.java
Comment on lines +81 to +83
int biggest = -99;
ListNode<Integer> current = head;
while(current != null) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, what if our biggest number was -525600?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants